//
//  StoreListDiscountCell.m
//  LiTianDecoration
//
//  Created by zero on 2018/7/13.
//  Copyright © 2018年 administrator. All rights reserved.
//

#import "StoreListDiscountCell.h"

@implementation StoreListDiscountCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(StoreListModel *)model{
    _model = model;
    [_img sd_setImageWithURL:[NSURL URLWithString:model.imageSrc2]];
    _label_name.text = model.chainName;
    _label_address.text = [NSString stringWithFormat:@"%@%@",model.areaInfo,model.address];
    _label_prices.text = [NSString stringWithFormat:@"¥ %@",model.goodsPrice];
    if (model.chainPromotionList.count == 0) {
        _label_activiyOne.text = nil;
        _label_activityTwo.text = nil;
    } else{
        
        for (int i = 0; i < model.chainPromotionList.count; i++) {
            StoreListActivityModel *one = model.chainPromotionList[i];
            if (i == 0)
                _label_activiyOne.text = one.promotionName;
             else
                 _label_activityTwo.text = one.promotionName;
        }
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
